All Questions
6 questions
1vote
2answers
229views
Choosing a strategy for representing and handling errors (or more generally status codes) in java 8
I asked this questions on StackOverflow but it's definitely a bit too broad. Even for this website, although the question is about software design, it might not be enough "focused". I am ...
0votes
1answer
1kviews
Best practice to create model objects in Java
I have an existing microservice that talks to a Natural Language Processing (NLP) product and fetches around 50 fields. I need to create domain objects in Java now from these fields. I read about ...
-1votes
1answer
552views
How to handle pagination in a stateless application having multiple components involved for the data?
This problem statement is around one UI component, 3 service components. The current design of the application is like: UI makes request to Service-A to get data Service-A first makes a call to ...
3votes
2answers
2kviews
Are there any problems with using class variables in Java that can be accessed by any method?
So I've been coding in Java for a decent amount of time, but recently, I've started a class that cares about my coding design. In the past, if I had two methods inside a class that needed to edit the ...
1vote
3answers
2kviews
Cyclic dependency in this project design
I have 2 modules (containing multiple classes). Let's call them Module A and Module B. Module B has a dependency on Module A: Module B -> Module A. Now, I have created an utility class C, which A ...
16votes
1answer
3kviews
Is it good practice to implement two Java 8 default methods in terms of each other?
I'm designing an interface with two related methods, similar to this: public interface ThingComputer { default Thing computeFirstThing() { return computeAllThings().get(0); } ...